<?php
$this->pageTitle = Yii::app()->name . ' - Login';
$this->breadcrumbs = array(
    'Login' => HSUrl::backendLoginUrl()
);
?>

<?php $form = $this->beginWidget('CActiveForm', array(
    'id' => 'loginForm',
    'enableClientValidation' => true,
    'method' => 'POST',
    'clientOptions' => array(
        'errorCssClass' => 'has-error',
        'validateOnSubmit' => true,
    ),
    'htmlOptions' => array(
        'role' => 'form',
        'class' => 'form-horizontal'
    )
)); ?>
<fieldset>
    <legend>Login</legend>
    <?php if ($model->getErrors()) {
        ?>
        <div class="alert alert-error">
            <button class="close" data-dismiss="alert" type="button"> ×</button>
            <?php echo $form->errorSummary($model); ?>
        </div>
    <?php } ?>
    <div class="row control-group">
        <?php echo $form->labelEx($model, 'username', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->textField($model, 'username', array('size' => 60, 'maxlength' => 255)); ?>
        </div>
    </div>
    <div class="row control-group">
        <?php echo $form->labelEx($model, 'password', array('class' => 'control-label')); ?>
        <div class="controls">
            <?php echo $form->passwordField($model, 'password', array('size' => 60, 'maxlength' => 255)); ?>
        </div>
    </div>

    <div class="row control-group buttons">
        <div class="controls">
            <?php echo CHtml::submitButton('Login', array('class' => 'btn btn-default')); ?>
        </div>
    </div>

</fieldset>

<?php $this->endWidget(); ?>
